3.11 \(\int x^2 \sinh (\frac{1}{4}+x+x^2) \, dx\)

Optimal. Leaf size=66 \[ \frac{3}{16} \sqrt{\pi } \text{Erf}\left (\frac{1}{2} (-2 x-1)\right )-\frac{1}{16} \sqrt{\pi } \text{Erfi}\left (\frac{1}{2} (2 x+1)\right )+\frac{1}{2} x \cosh \left (x^2+x+\frac{1}{4}\right )-\frac{1}{4} \cosh \left (x^2+x+\frac{1}{4}\right ) \]

[Out]

-Cosh[1/4 + x + x^2]/4 + (x*Cosh[1/4 + x + x^2])/2 + (3*Sqrt[Pi]*Erf[(-1 - 2*x)/2])/16 - (Sqrt[Pi]*Erfi[(1 + 2
*x)/2])/16

________________________________________________________________________________________

Rubi [A]  time = 0.056489, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {5386, 5375, 2234, 2204, 2205, 5382, 5374} \[ \frac{3}{16} \sqrt{\pi } \text{Erf}\left (\frac{1}{2} (-2 x-1)\right )-\frac{1}{16} \sqrt{\pi } \text{Erfi}\left (\frac{1}{2} (2 x+1)\right )+\frac{1}{2} x \cosh \left (x^2+x+\frac{1}{4}\right )-\frac{1}{4} \cosh \left (x^2+x+\frac{1}{4}\right ) \]

Antiderivative was successfully verified.

[In]

Int[x^2*Sinh[1/4 + x + x^2],x]

[Out]

-Cosh[1/4 + x + x^2]/4 + (x*Cosh[1/4 + x + x^2])/2 + (3*Sqrt[Pi]*Erf[(-1 - 2*x)/2])/16 - (Sqrt[Pi]*Erfi[(1 + 2
*x)/2])/16

Rule 5386

Int[((d_.) + (e_.)*(x_))^(m_)*Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[(e*(d + e*x)^(m - 1)*
Cosh[a + b*x + c*x^2])/(2*c), x] + (-Dist[(e^2*(m - 1))/(2*c), Int[(d + e*x)^(m - 2)*Cosh[a + b*x + c*x^2], x]
, x] - Dist[(b*e - 2*c*d)/(2*c), Int[(d + e*x)^(m - 1)*Sinh[a + b*x + c*x^2], x], x]) /; FreeQ[{a, b, c, d, e}
, x] && GtQ[m, 1] && NeQ[b*e - 2*c*d, 0]

Rule 5375

Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[1/2, Int[E^(a + b*x + c*x^2), x], x] + Dist[1/2
, Int[E^(-a - b*x - c*x^2), x], x] /; FreeQ[{a, b, c}, x]

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 5382

Int[((d_.) + (e_.)*(x_))*Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[(e*Cosh[a + b*x + c*x^2])/
(2*c), x] - Dist[(b*e - 2*c*d)/(2*c), Int[Sinh[a + b*x + c*x^2], x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b*
e - 2*c*d, 0]

Rule 5374

Int[Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[1/2, Int[E^(a + b*x + c*x^2), x], x] - Dist[1/2
, Int[E^(-a - b*x - c*x^2), x], x] /; FreeQ[{a, b, c}, x]

Rubi steps

\begin{align*} \int x^2 \sinh \left (\frac{1}{4}+x+x^2\right ) \, dx &=\frac{1}{2} x \cosh \left (\frac{1}{4}+x+x^2\right )-\frac{1}{2} \int \cosh \left (\frac{1}{4}+x+x^2\right ) \, dx-\frac{1}{2} \int x \sinh \left (\frac{1}{4}+x+x^2\right ) \, dx\\ &=-\frac{1}{4} \cosh \left (\frac{1}{4}+x+x^2\right )+\frac{1}{2} x \cosh \left (\frac{1}{4}+x+x^2\right )-\frac{1}{4} \int e^{-\frac{1}{4}-x-x^2} \, dx-\frac{1}{4} \int e^{\frac{1}{4}+x+x^2} \, dx+\frac{1}{4} \int \sinh \left (\frac{1}{4}+x+x^2\right ) \, dx\\ &=-\frac{1}{4} \cosh \left (\frac{1}{4}+x+x^2\right )+\frac{1}{2} x \cosh \left (\frac{1}{4}+x+x^2\right )-\frac{1}{8} \int e^{-\frac{1}{4}-x-x^2} \, dx+\frac{1}{8} \int e^{\frac{1}{4}+x+x^2} \, dx-\frac{1}{4} \int e^{-\frac{1}{4} (-1-2 x)^2} \, dx-\frac{1}{4} \int e^{\frac{1}{4} (1+2 x)^2} \, dx\\ &=-\frac{1}{4} \cosh \left (\frac{1}{4}+x+x^2\right )+\frac{1}{2} x \cosh \left (\frac{1}{4}+x+x^2\right )+\frac{1}{8} \sqrt{\pi } \text{erf}\left (\frac{1}{2} (-1-2 x)\right )-\frac{1}{8} \sqrt{\pi } \text{erfi}\left (\frac{1}{2} (1+2 x)\right )-\frac{1}{8} \int e^{-\frac{1}{4} (-1-2 x)^2} \, dx+\frac{1}{8} \int e^{\frac{1}{4} (1+2 x)^2} \, dx\\ &=-\frac{1}{4} \cosh \left (\frac{1}{4}+x+x^2\right )+\frac{1}{2} x \cosh \left (\frac{1}{4}+x+x^2\right )+\frac{3}{16} \sqrt{\pi } \text{erf}\left (\frac{1}{2} (-1-2 x)\right )-\frac{1}{16} \sqrt{\pi } \text{erfi}\left (\frac{1}{2} (1+2 x)\right )\\ \end{align*}

Mathematica [A]  time = 0.150503, size = 72, normalized size = 1.09 \[ \frac{1}{16} \left (-3 \sqrt{\pi } \text{Erf}\left (x+\frac{1}{2}\right )-\sqrt{\pi } \text{Erfi}\left (x+\frac{1}{2}\right )+\frac{2 (2 x-1) \left (\left (\sqrt{e}-1\right ) \sinh (x (x+1))+\left (1+\sqrt{e}\right ) \cosh (x (x+1))\right )}{\sqrt [4]{e}}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*Sinh[1/4 + x + x^2],x]

[Out]

(-3*Sqrt[Pi]*Erf[1/2 + x] - Sqrt[Pi]*Erfi[1/2 + x] + (2*(-1 + 2*x)*((1 + Sqrt[E])*Cosh[x*(1 + x)] + (-1 + Sqrt
[E])*Sinh[x*(1 + x)]))/E^(1/4))/16

________________________________________________________________________________________

Maple [C]  time = 0.04, size = 75, normalized size = 1.1 \begin{align*}{\frac{x}{4}{{\rm e}^{-{\frac{ \left ( 1+2\,x \right ) ^{2}}{4}}}}}-{\frac{1}{8}{{\rm e}^{-{\frac{ \left ( 1+2\,x \right ) ^{2}}{4}}}}}-{\frac{3\,\sqrt{\pi }}{16}{\it Erf} \left ({\frac{1}{2}}+x \right ) }+{\frac{x}{4}{{\rm e}^{{\frac{ \left ( 1+2\,x \right ) ^{2}}{4}}}}}-{\frac{1}{8}{{\rm e}^{{\frac{ \left ( 1+2\,x \right ) ^{2}}{4}}}}}+{\frac{i}{16}}\sqrt{\pi }{\it Erf} \left ( ix+{\frac{i}{2}} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*sinh(1/4+x+x^2),x)

[Out]

1/4*x*exp(-1/4*(1+2*x)^2)-1/8*exp(-1/4*(1+2*x)^2)-3/16*erf(1/2+x)*Pi^(1/2)+1/4*x*exp(1/4*(1+2*x)^2)-1/8*exp(1/
4*(1+2*x)^2)+1/16*I*Pi^(1/2)*erf(I*x+1/2*I)

________________________________________________________________________________________

Maxima [B]  time = 1.43015, size = 247, normalized size = 3.74 \begin{align*} \frac{1}{3} \, x^{3} \sinh \left (x^{2} + x + \frac{1}{4}\right ) + \frac{{\left (2 \, x + 1\right )}^{5} \Gamma \left (\frac{5}{2}, \frac{1}{4} \,{\left (2 \, x + 1\right )}^{2}\right )}{6 \,{\left ({\left (2 \, x + 1\right )}^{2}\right )}^{\frac{5}{2}}} + \frac{{\left (2 \, x + 1\right )}^{5} \Gamma \left (\frac{5}{2}, -\frac{1}{4} \,{\left (2 \, x + 1\right )}^{2}\right )}{6 \, \left (-{\left (2 \, x + 1\right )}^{2}\right )^{\frac{5}{2}}} + \frac{{\left (2 \, x + 1\right )}^{3} \Gamma \left (\frac{3}{2}, \frac{1}{4} \,{\left (2 \, x + 1\right )}^{2}\right )}{8 \,{\left ({\left (2 \, x + 1\right )}^{2}\right )}^{\frac{3}{2}}} + \frac{{\left (2 \, x + 1\right )}^{3} \Gamma \left (\frac{3}{2}, -\frac{1}{4} \,{\left (2 \, x + 1\right )}^{2}\right )}{8 \, \left (-{\left (2 \, x + 1\right )}^{2}\right )^{\frac{3}{2}}} + \frac{1}{48} \, e^{\left (\frac{1}{4} \,{\left (2 \, x + 1\right )}^{2}\right )} - \frac{1}{48} \, e^{\left (-\frac{1}{4} \,{\left (2 \, x + 1\right )}^{2}\right )} - \frac{1}{4} \, \Gamma \left (2, \frac{1}{4} \,{\left (2 \, x + 1\right )}^{2}\right ) - \frac{1}{4} \, \Gamma \left (2, -\frac{1}{4} \,{\left (2 \, x + 1\right )}^{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*sinh(1/4+x+x^2),x, algorithm="maxima")

[Out]

1/3*x^3*sinh(x^2 + x + 1/4) + 1/6*(2*x + 1)^5*gamma(5/2, 1/4*(2*x + 1)^2)/((2*x + 1)^2)^(5/2) + 1/6*(2*x + 1)^
5*gamma(5/2, -1/4*(2*x + 1)^2)/(-(2*x + 1)^2)^(5/2) + 1/8*(2*x + 1)^3*gamma(3/2, 1/4*(2*x + 1)^2)/((2*x + 1)^2
)^(3/2) + 1/8*(2*x + 1)^3*gamma(3/2, -1/4*(2*x + 1)^2)/(-(2*x + 1)^2)^(3/2) + 1/48*e^(1/4*(2*x + 1)^2) - 1/48*
e^(-1/4*(2*x + 1)^2) - 1/4*gamma(2, 1/4*(2*x + 1)^2) - 1/4*gamma(2, -1/4*(2*x + 1)^2)

________________________________________________________________________________________

Fricas [A]  time = 2.17879, size = 181, normalized size = 2.74 \begin{align*} -\frac{1}{16} \,{\left (\sqrt{\pi }{\left (3 \, \operatorname{erf}\left (x + \frac{1}{2}\right ) + \operatorname{erfi}\left (x + \frac{1}{2}\right )\right )} e^{\left (x^{2} + x + \frac{1}{4}\right )} - 2 \,{\left (2 \, x - 1\right )} e^{\left (2 \, x^{2} + 2 \, x + \frac{1}{2}\right )} - 4 \, x + 2\right )} e^{\left (-x^{2} - x - \frac{1}{4}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*sinh(1/4+x+x^2),x, algorithm="fricas")

[Out]

-1/16*(sqrt(pi)*(3*erf(x + 1/2) + erfi(x + 1/2))*e^(x^2 + x + 1/4) - 2*(2*x - 1)*e^(2*x^2 + 2*x + 1/2) - 4*x +
 2)*e^(-x^2 - x - 1/4)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \sinh{\left (x^{2} + x + \frac{1}{4} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*sinh(1/4+x+x**2),x)

[Out]

Integral(x**2*sinh(x**2 + x + 1/4), x)

________________________________________________________________________________________

Giac [C]  time = 1.39717, size = 72, normalized size = 1.09 \begin{align*} \frac{1}{8} \,{\left (2 \, x - 1\right )} e^{\left (x^{2} + x + \frac{1}{4}\right )} + \frac{1}{8} \,{\left (2 \, x - 1\right )} e^{\left (-x^{2} - x - \frac{1}{4}\right )} - \frac{3}{16} \, \sqrt{\pi } \operatorname{erf}\left (x + \frac{1}{2}\right ) - \frac{1}{16} i \, \sqrt{\pi } \operatorname{erf}\left (-i \, x - \frac{1}{2} i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*sinh(1/4+x+x^2),x, algorithm="giac")

[Out]

1/8*(2*x - 1)*e^(x^2 + x + 1/4) + 1/8*(2*x - 1)*e^(-x^2 - x - 1/4) - 3/16*sqrt(pi)*erf(x + 1/2) - 1/16*I*sqrt(
pi)*erf(-I*x - 1/2*I)